package com.xiongda.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 用户
 * @author 缪琼
 */
public class User {
    private Long id;// id

    private String userName;// 用户名

    private String password;// 密码

    private Integer role;// 用户等级

    private String realName;// 真实姓名

    private String idcard;// 身份证号码

    private String nickName;// 昵称

    private String headPicture;// 头像

    private Integer gender;// 性别

    private Integer age;// 年龄

    private Date birthday;// 生日

    private String qq;// QQ号码

    private String email;// 邮箱地址

    private String phone;// 电话

    private String address;// 住址

    private Date createTime;// 创建时间

    private Date updateTime;// 更新时间

    private Date lastLoginTime;// 最后登录时间

    private Integer activated;// 是否激活

    private Integer locked;// 是否冻结

    private Integer delFlag;// 逻辑删除标识

    private String activatedCode;// 激活码

    public User(Long id, String userName, String password, Integer role, String realName, String idcard, String nickName, String headPicture, Integer gender, Integer age, Date birthday, String qq, String email, String phone, String address, Date createTime, Date updateTime, Date lastLoginTime, Integer activated, Integer locked, Integer delFlag, String activatedCode) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.role = role;
        this.realName = realName;
        this.idcard = idcard;
        this.nickName = nickName;
        this.headPicture = headPicture;
        this.gender = gender;
        this.age = age;
        this.birthday = birthday;
        this.qq = qq;
        this.email = email;
        this.phone = phone;
        this.address = address;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.lastLoginTime = lastLoginTime;
        this.activated = activated;
        this.locked = locked;
        this.delFlag = delFlag;
        this.activatedCode = activatedCode;
    }

    public User() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName == null ? null : realName.trim();
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard == null ? null : idcard.trim();
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName == null ? null : nickName.trim();
    }

    public String getHeadPicture() {
        return headPicture;
    }

    public void setHeadPicture(String headPicture) {
        this.headPicture = headPicture == null ? null : headPicture.trim();
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq == null ? null : qq.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Integer getActivated() {
        return activated;
    }

    public void setActivated(Integer activated) {
        this.activated = activated;
    }

    public Integer getLocked() {
        return locked;
    }

    public void setLocked(Integer locked) {
        this.locked = locked;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getActivatedCode() {
        return activatedCode;
    }

    public void setActivatedCode(String activatedCode) {
        this.activatedCode = activatedCode == null ? null : activatedCode.trim();
    }
}